#ifndef VIDEOSETTINGS_H
#define VIDEOSETTINGS_H

#include <OgreStringVector.h>
#include <boost/shared_ptr.hpp>
#include "SettingsManager.h"

typedef boost::shared_ptr<Ogre::String> CharArrayPtr;

struct OpenGLConfig
{
	CharArrayPtr colorDepth;
	CharArrayPtr displayFrequency;
	CharArrayPtr fsaa;
	CharArrayPtr resolution;
	CharArrayPtr vsync;
	CharArrayPtr fullscreen;
};

class VideoSettings
{
public:
	VideoSettings(void);
	~VideoSettings(void);
	void updateSettings(void);
	OpenGLConfig *getCurOpenGLSettings(void) const;
	const Ogre::StringVector getResolutionList(void) const;
	const Ogre::StringVector getFSAAList(void) const;
	bool getVSync(void) const;
protected:
	bool findPossibleSettings(void);
	void loadSettings(void);
	void setupDisplay(void);
	SettingsManager *mpXMLManager;
	Ogre::RenderSystem *mpRenderSystem;
	// Currenct video settings
	OpenGLConfig *mpCurOpenGLSettings;
	// Possible resolutions
	Ogre::StringVector mResolutionList;
	// Possible values for FSAA
	Ogre::StringVector mFSAAList;
	// Possibility for VSync
	bool mVSync;
};

#endif